package com.siysoft.tc.admin.action;

import java.util.List;
import java.util.Map;

import javax.servlet.http.HttpServletRequest;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import com.siysoft.tc.admin.service.IAdminRecordService;
import com.siysoft.util.IMap;

/**
 * <p>Title: AdminRecordController</p>
 * <p>Description:咨询管理功能</p>
 * <p>Company: dmpb</p>
 * @author    victor
 * @date       2015年11月12日
 */
@Controller
@RequestMapping(value = "/admin/record")
public class AdminRecordController {
	@Autowired
	IAdminRecordService recordService;
	
	
	//文章管理
	@RequestMapping(value = "/toUser")
	public String toUser(HttpServletRequest request) throws Exception{
		IMap iMap = new IMap(request);
		List<Map<String,Object>> seekUserRecords = recordService.seekUserRecords(iMap);
		request.setAttribute("recordUserList", seekUserRecords);
		return "/admin/record/recordUserList";
	}
	
	//文章管理
	@RequestMapping(value = "/toManager")
	public String toManager(HttpServletRequest request) throws Exception{
		IMap iMap = new IMap(request);
		List<Map<String,Object>> seekManagerRecords = recordService.seekManagerRecords(iMap);
		request.setAttribute("recordManagerList", seekManagerRecords);
		return "/admin/record/recordManagerList";
	}
	
	
}
